<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>for循环语句</title>
</head>
<body>

<script>

    cars=["BMW","Volvo","Saab","Ford"];
    for (var i=0,l=cars.length; i<l; i++){
        document.write(cars[i] + "<br>");
    }
</script>
</body>

</html>

